<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class TeachesVideo extends Model
{
    use SoftDeletes;
    
    protected $table="teaches_video";
    
    protected $primaryKey = 'video_id';
    
    protected $fillable = ['video_id','video_name','file_name','file_path','news_id','video_url','user_id','status','time','video_type','url'];
    
    protected $dates = ['deleted_at'];
    
    /**
     * 与用户一对一关联
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function users()
    {
        return $this->hasOne('App\User','id','user_id');
    }
}